import { Organization } from "@/api/interface/organization";
import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";

/**
 * @name 组织架构接口
 */

// 查询公司组织架构
export const getDepartment = (params: Organization.ReqOrganization) => {
  return http.post<Organization.ResOrganizationData>(PORT1 + `/department/company`, params);
};

// 添加公司组织架构
export const addDepartment = (params: Organization.ResOrganizationData) => {
  return http.post(PORT1 + `/department/add`, params);
};

// 修改公司组织架构
export const updateDepartment = (params: Organization.ResOrganizationData) => {
  return http.post(PORT1 + `/department/update`, params);
};

// 删除公司组织架构
export const delDepartment = (params: Organization.ReqOrganization) => {
  return http.get(PORT1 + `/department/delete`, params);
};

// 移动公司组织架构
export const moveDepartment = (params: Organization.ResOrganizationData) => {
  return http.post(PORT1 + `/department/movement`, params);
};
